﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/MasterPages/Blank.Master" AutoEventWireup="true" CodeBehind="StatArchInfo.aspx.cs" Inherits="DMS.Web.Modules.Statistics.StatArchInfo" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="diy" %>
<%@ Register Src="~/Common/Controls/Loading.ascx" TagName="Loading" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageTitle" runat="server">
    按部门统计
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" language="javascript">
        function showFrame(index, obj) {
            $(obj).siblings('.body').children().css('display', 'none');
            $(obj).siblings('.body').children(':eq(' + index + ')').css('display', 'inline');
            $(obj).attr('class', 'title');
            $(obj).siblings('[class$=title]').attr('class', 'title_behind');
        }
        function getClientIds1() {
            return {
                btnSearch: '#<%= btnSearch.ClientID %>',
                exportBtn: '#<%= exportBtn.ClientID %>'
            };
        }
    </script>
<script type="text/javascript" src="/Modules/ArchivesManagement/Scripts/ArchInfoList.js"></script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainHolder" runat="server">
    <div class="search">
                
                <!----------- 查询信息 ------------------>
                <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="form">
                            <table cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <th>
                                        所属年月：
                                    </th>
                                    <td>
                                        <asp:DropDownList ID="ddlBelongYear" runat="server" Width="55px">
                                            <asp:ListItem Value="" Text="全部"></asp:ListItem>
                                            <asp:ListItem Value="2014" Text="2014"></asp:ListItem>
                                            <asp:ListItem Value="2013" Text="2013"></asp:ListItem>
                                            <asp:ListItem Value="2012" Text="2012"></asp:ListItem>
                                            <asp:ListItem Value="2011" Text="2011"></asp:ListItem>
                                            <asp:ListItem Value="2010" Text="2010"></asp:ListItem>
                                            <asp:ListItem Value="2009" Text="2009"></asp:ListItem>
                                            <asp:ListItem Value="2008" Text="2008"></asp:ListItem>
                                            <asp:ListItem Value="2007" Text="2007"></asp:ListItem>
                                            <asp:ListItem Value="2006" Text="2006"></asp:ListItem>
                                            <asp:ListItem Value="2005" Text="2005"></asp:ListItem>
                                            <asp:ListItem Value="2004" Text="2004"></asp:ListItem>
                                            <asp:ListItem Value="2003" Text="2003"></asp:ListItem>
                                            <asp:ListItem Value="2002" Text="2002"></asp:ListItem>
                                            <asp:ListItem Value="2001" Text="2001"></asp:ListItem>
                                        </asp:DropDownList>
                                        年
                                        <asp:DropDownList ID="ddlBelongMonth" runat="server" Width="50px">
                                            <asp:ListItem Value="" Text="全部"></asp:ListItem>
                                            <asp:ListItem Value="1" Text="1"></asp:ListItem>
                                            <asp:ListItem Value="2" Text="2"></asp:ListItem>
                                            <asp:ListItem Value="3" Text="3"></asp:ListItem>
                                            <asp:ListItem Value="4" Text="4"></asp:ListItem>
                                            <asp:ListItem Value="5" Text="5"></asp:ListItem>
                                            <asp:ListItem Value="6" Text="6"></asp:ListItem>
                                            <asp:ListItem Value="7" Text="7"></asp:ListItem>
                                            <asp:ListItem Value="8" Text="8"></asp:ListItem>
                                            <asp:ListItem Value="9" Text="9"></asp:ListItem>
                                            <asp:ListItem Value="10" Text="10"></asp:ListItem>
                                            <asp:ListItem Value="11" Text="11"></asp:ListItem>
                                            <asp:ListItem Value="12" Text="12"></asp:ListItem>
                                        </asp:DropDownList>
                                        月
                                    </td>                                    
                                    <th>
                                        档案名称：
                                    </th>
                                    <td>
                                        <asp:TextBox TextMode="MultiLine" Height="22px" ID="txtName" runat="server" Width="150px"></asp:TextBox>
                                    </td>
                                    <th style="width: 100px">
                                         档案类型：
                                    </th>
                                    <td>
                                        <asp:DropDownList ID="txtType" runat="server" Width="150px">
                                            <asp:ListItem Value="" Text="全部"></asp:ListItem>
                                            <asp:ListItem Value="DJ" Text="登记类"></asp:ListItem>
                                            <asp:ListItem Value="ZJ" Text="征缴类"></asp:ListItem>
                                            <asp:ListItem Value="ZH" Text="综合类"></asp:ListItem>                        
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        形成日期：
                                    </th>
                                    <td>
                                        <asp:TextBox ID="txtInitDateBegin" onClick="WdatePicker()" runat="server" Width="70px"></asp:TextBox>
                                        至
                                        <asp:TextBox ID="txtInitDateEnd" onClick="WdatePicker()" runat="server" Width="70px"></asp:TextBox>
                                    </td>
                                    <th>
                                        保管起始日期：
                                    </th>
                                    <td>
                                        <asp:TextBox ID="txtBeginTimeBegin" onClick="WdatePicker()" runat="server" Width="70px"></asp:TextBox>
                                        至
                                        <asp:TextBox ID="txtBeginTimeEnd" onClick="WdatePicker()" runat="server" Width="70px"></asp:TextBox>
                                    </td>
                                    <th>
                                        到期日期：
                                    </th>
                                    <td>
                                        <asp:TextBox ID="txtExpireTimeBegin" onClick="WdatePicker()" runat="server" Width="70px"></asp:TextBox>
                                        至
                                        <asp:TextBox ID="txtExpireTimeEnd" onClick="WdatePicker()" runat="server" Width="70px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <th style="width: 100px">
                                         姓名：
                                    </th>
                                    <td>
                                        <asp:TextBox ID="txtPersonName" runat="server" Width="150px"></asp:TextBox>
                                    </td>
                                    <th>
                                        是否销毁：
                                    </th>
                                    <td>
                                        <asp:DropDownList ID="ddlDestroy" runat="server" Width="50px">
                                            <asp:ListItem Value="" Text="全部"></asp:ListItem>
                                            <asp:ListItem Value="True" Text="是"></asp:ListItem>
                                            <asp:ListItem Value="False" Selected="True" Text="否"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <th>
                                       是否到期：
                                    </th>
                                    <td>
                                        <asp:DropDownList ID="ddlIsExpire" runat="server" Width="50px">
                                            <asp:ListItem Value="" Text="全部"></asp:ListItem>
                                            <asp:ListItem Value="True" Text="是"></asp:ListItem>
                                            <asp:ListItem Value="False" Text="否"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>

                        </td>
                    </tr>
                </table>
            </div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div align="left" style="padding: 5 0 0 0">
                <span class="search"  style="padding: 2 0 2 2">
                    <asp:CheckBox ID="CurrentPage" OnClick="CheckChange(this)" CssClass="checkboxGroup1" Text="全选当前页" runat="server"/>
                    <asp:CheckBox ID="AllPage" OnClick="CheckChange(this)" CssClass="checkboxGroup2" Text="全选所有" runat="server" style="display: none"/>
                </span>&nbsp;&nbsp;
                <asp:LinkButton CssClass="linkbtn" ID="btnSearch"  OnClick="btnStat_Click" runat="server"><span>统计</span></asp:LinkButton>
                <a class="linkbtn" href="javascript:exportData();"><span>数据导出</span></a>
                <a onclick="destory();"  ID="destoryBtn"  runat="server" class="linkbtn _searchBtn" href="#"><span>销毁</span></a>
            </div>

            <div class="webpart">
                    <div id="div_List" class="title" onclick="showFrame(0,this)" style="display:inline;width:105px;cursor:pointer">
                        报表展示</div>
                    <%--<div id="div_Chart" class="title_behind" onclick="showFrame(1,this)" style="display:inline;width:105px;cursor:hand">
                        图表展示</div>--%>
                    <div class="body">
                        
                            <!----------- 数据列表 ------------------>
                            <div style="overflow-x:auto;overflow-y:auto;width:100%;height: 390px">
            <asp:GridView ID="archInfoList" runat="server" class="dg_borderstyle" AutoGenerateColumns="False" 
                CellPadding="0" CellSpacing="1" border="0" ShowHeaderWhenEmpty="true" OnRowCommand="DealCommand" 
                AlternatingRowStyle-CssClass="dg_alternatingitemstyle" AllowSorting="True" OnSorting="GridView1_Sorting"
                RowStyle-CssClass="dg_itemstyle">
                <HeaderStyle CssClass="dg_headerstyle"></HeaderStyle>
                <Columns>
                    <asp:BoundField DataField="ArchivesID" HeaderText="资料信息ID" Visible="false"/>
                    <asp:TemplateField ItemStyle-Width="20px">
                        <ItemTemplate>
                            <input id="chkItem" class="_selectItem" runat="server" type="checkbox" value='<%# DataBinder.Eval(Container, "DataItem.ArchivesID").ToString()%>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <%--<asp:BoundField DataField="BelongYear" HeaderText="所属年月" SortExpression="BelongYear"/>
                    <asp:BoundField DataField="BelongMonth" HeaderText="所属月份" SortExpression="BelongMonth"/>--%>
                    <asp:TemplateField HeaderText="所属年月"   ItemStyle-Wrap="False" HeaderStyle-Wrap="False" >
                        <ItemTemplate>
                            <%# Eval("BelongYear")%>年<%#Eval("BelongMonth")%>月
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:HyperLinkField   ItemStyle-Wrap="False" HeaderStyle-Wrap="False" DataNavigateUrlFields="ArchivesID" DataNavigateUrlFormatString="/Modules/ArchivesManagement/ArchInfoForm.aspx?id={0}&action=View"
                        DataTextField="Name" HeaderText="档案名称" Target="_blank" SortExpression="Name"/>
                    <asp:TemplateField   ItemStyle-Wrap="False" HeaderStyle-Wrap="False" HeaderText="档案类型" SortExpression="Type">
                        <ItemTemplate>
                            <%# Eval("Type").ToString()=="DJ"?"登记类":(Eval("Type").ToString()=="ZJ"?"征缴类":(Eval("Type").ToString()=="ZH"?"综合类":"未指定")) %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField   ItemStyle-Wrap="False" HeaderStyle-Wrap="False" DataField="InitDate" HeaderText="形成日期" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False" SortExpression="InitDate"/>
                    <asp:BoundField   ItemStyle-Wrap="False" HeaderStyle-Wrap="False" DataField="CustodyBeginDate" HeaderText="保管起始日期" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False" SortExpression="CustodyBeginDate"/>
                    <%--<asp:BoundField DataField="CustodyYear" HeaderText="保管年限" SortExpression="CustodyYear"/>--%> 
                    <asp:TemplateField   ItemStyle-Wrap="False" HeaderStyle-Wrap="False" HeaderText="保管年限" SortExpression="CustodyYear">
                        <ItemTemplate>
                            <%# Eval("CustodyYear").ToString()=="0"?"永久":Eval("CustodyYear") %>
                        </ItemTemplate>
                    </asp:TemplateField> 
                    <asp:BoundField   ItemStyle-Wrap="False" HeaderStyle-Wrap="False" DataField="CustodyEndDate" HeaderText="到期日期" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False" SortExpression="CustodyEndDate"/>
                    <asp:BoundField  ItemStyle-Wrap="False" HeaderStyle-Wrap="False"  DataField="PersonName" HeaderText="姓名" SortExpression="PersonName"/>     
                    <asp:BoundField   ItemStyle-Wrap="False" HeaderStyle-Wrap="False" DataField="PageCount" HeaderText="张数" SortExpression="PageCount"/>
                     <asp:TemplateField   ItemStyle-Wrap="False" HeaderStyle-Wrap="False" HeaderText="是否销毁" SortExpression="IsDestroy">
                        <ItemTemplate>
                            <%# Eval("IsDestroy").ToString()=="True"?"是":"否" %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField   ItemStyle-Wrap="False" HeaderStyle-Wrap="False" HeaderText="操作">
                        <ItemTemplate>
                            <a href='<%#"javascript:openForm(\"Edit\",\"" + Eval("ArchivesID") + "\")"%>'><span>编辑</span></a>
                            <a href='<%#"javascript:uploadFile(\"" + Eval("ArchivesID") + "\")"%>'><span>上传附件</span></a>
                            <asp:LinkButton CommandArgument='<%#Eval("ArchivesID") %>' OnClientClick="return deleteConfirm();" CommandName="DeleteArchInfo" runat="server" ID="btnDelete"><span>删除</span></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <!--分页-->
            <table width="100%">
                <tr>                    
                    <td Width="85%">
                        <diy:AspNetPager ID="pager" runat="server" AlwaysShow="true" OnPageChanged="pager_PageChanged"
                            Width="100%" ShowPageIndexBox="Always" PageIndexBoxType="TextBox" TextBeforePageIndexBox="转到"
                            TextAfterPageIndexBox="页" ShowCustomInfoSection="Left" CustomInfoHTML="总数：%RecordCount%，共 %PageCount% 页，当前为第%CurrentPageIndex%页"
                            HorizontalAlign="right" FirstPageText="首页" PrevPageText="上页" NextPageText="下页"
                            LastPageText="末页" CssClass="dg_pagestyle" PageSize="15">
                        </diy:AspNetPager>    
                    </td>
                    <td Width="15%">，每页<asp:TextBox ID="PageSize" runat="server" style="width: 30px" Text="15" onblur="CheckPageSize(this)"></asp:TextBox>条记录。</td>
                </tr>
            </table>
            
                    </div>
                    </div>
            </div>
         <Triggers>
            <%--<asp:PostBackTrigger ControlID="lbtnAddMember" />
            <asp:PostBackTrigger ControlID="lbtnExport" />--%>
            </Triggers>
        </ContentTemplate>
    </asp:UpdatePanel>  
    <asp:LinkButton CssClass="linkbtn" ID="exportBtn" OnClick="ExportClick" runat="server" style="display: none"><span>数据导出</span></asp:LinkButton> 

<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
    DynamicLayout="true">
    <ProgressTemplate>
        <uc1:Loading ID="Loading1" runat="server" />
    </ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>


